<div ng-controller="ManyParamssetCtrl">
	<div class="panel panel-default">
	 	<div class="panel-body" style="padding-top: 0;padding-bottom: 0;">
	 		<div class="nav navbar-nav m-t">
	 			<a ui-sref="app.control.electricquantity({page:'{{$state.params.page}}'})" ><span style="background-color: #e0e0e0; text-align: center;"><i class="glyphicon glyphicon-arrow-left" style="height:30px;width:30px; "></i></span></a> 		            
	            <span><b>控制管理</b></span>
	            <i class="fa fa-angle-right" style="font-size:20px"></i>
	            <span><b>用电管理</b> </span>
	            <i class="fa fa-angle-right" style="font-size:20px"></i>
	            <span><b>批量设置</b> </span>	            
	         </div>
	        <!-- nabar right -->
	        <ul class="nav navbar-nav navbar-right">          
	          <li class="dropdown" dropdown>
	            <a href class="dropdown-toggle clear" dropdown-toggle>
	              <span class="thumb-sm avatar pull-right m-t-n-sm m-b-n-sm m-l-sm">
	                <img src="img/a0.jpg" alt="...">
	                <i class="on md b-white bottom"></i>
	              </span>
	              <span class="hidden-sm hidden-md"><b>{{namedata}}</b></span> <b class="caret"></b>
	            </a>
	            <!-- dropdown -->
	            <ul class="dropdown-menu animated fadeInRight w">  
	              <li>
	                <a ui-sref="app.user.info">用户信息</a>
	              </li>       
	              <li class="divider"></li>
	              <li>
	                <a ui-sref="access.signin" ng-click="logout()">登出</a>
	              </li>
	            </ul>
	            <!-- / dropdown -->
	          </li>
	        </ul>
	 	</div>
	</div>
<div class="panel m-t-n-md">
		<div class="panel-body" style="height: 900px;">
			<h3>用电参数设置</h3>
			<div class="row m-t-lg">
				<div class="col-md-6">
					<table class="table" style="font-size: 16px">
						<tr>
							<th>请选择学校</th>
							<td>
								<select class="form-control btn-rounded" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)" ng-model="b.school_name" ng-options="key as key for (key,value) in mmData" ng-change="b.buildingtype='';b.building_name='';b.layer_name='';" >
				                  <option value="">--请选择学校--</option>                 
				                </select>
							</td>
						</tr>
						<tr>
							<th>请选择类型</th>
							<td>
								<select class="form-control btn-rounded" ng-model="b.buildingtype" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)"  ng-change="b.building_name='';b.layer_name='';">
					                <option value="">--请选择类型--</option>
					                <option ng-if="key!='school_id'&&key!='school_name'" ng-repeat="(key,value) in mmData[b.school_name]" value="{{key}}+{{mmData[b.school_name].school_id}}">{{key}}</option >
					            </select>
							</td>
						</tr>
							<tr>
							<th>请选择楼号</th>
							<td>							
								<select class="form-control btn-rounded" ng-model="b.building_name" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)" ng-options="key as key for (key,value) in mmData[b.school_name][b.buildingtype.split('+')[0]]" ng-change="b.layer_name='';">
				                  <option value="">--请选择楼号--</option>
				                  
				                </select>
							</td>
						</tr>
						<tr>
							<th>请选择楼层</th>
							<td>
								<select class="form-control btn-rounded" ng-model="b.layer_name" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)">
				                  <option value="">--请选择楼层--</option>
				                  <option value="{{mmData[b.school_name][b.buildingtype.split('+')[0]][b.building_name].campus_id}}+所有层">所有层</option>
				                  <option ng-if="value!='所有层'"  ng-repeat="(key,value) in mmData[b.school_name][b.buildingtype.split('+')[0]][b.building_name].layers" value="{{value.layer_name}}+{{mmData[b.school_name][b.buildingtype.split('+')[0]][b.building_name].campus_id}}+{{value.layer_id}}">               
				                    {{value.layer_name}}
				                  </option>				                  
				                </select>           
							</td>
						</tr>							
					</table>
				</div>
				<div class="col-md-6">
					<table class="table" style="font-size: 16px">
						<tr>
							<th>最大功率设置</th>
							<td>
								<input type="text" class="form-control btn-rounded" style="border-width: 0.5px;  padding:5px 10px;  background: rgb(245,245,245); "  ng-model="b.max_power" >
							</td>
						
						</tr>
						<tr>
							<th>自动恢复时间</th>
							<td>
								<input type="text" class="form-control btn-rounded" style="border-width: 0.5px;  padding:5px 10px;  background: rgb(245,245,245);" ng-model="b.auto_regain_min"></td>
						</tr>
						<tr>
							<th>批量操作：</th>					
							<td>
								<button class="btn btn-sm btn-info btn-rounded" ng-click="recover(aaData.layer_id,aaData.room_id)">恢复用电</button>							
								<button class="btn btn-sm btn-danger btn-rounded" ng-click="force(aaData.layer_id,aaData.room_id)">强制断电</button>					
							</td>						
						
						    </td>
						</tr>
						<!-- <tr>
						
							
						</tr> -->
							
					</table>
				</div>
				
			</div>
			<div class="text-center m-t-xxl">
				<button class="btn btn-rounded" ng-click="save()">确认修改</button>
			</div>
		</div>
	</div>
</div>



